<?php			
	include_once("./View/Topo.php");
?>		
			
<nav class="navbar navbar-default" role="navigation">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="navbar-header">
    <div class="navbar-brand">CADASTRO DE SUBGRUPOS DE GRUPOS DE PRODUTOS</div>
  </div>
</nav>

<form action="" method="POST">

<input type="hidden" name="metodo" value="salvar"/>

<div class="row">
	<div class="form-group col-sm-4">
		<label>Grupos</label>
		<select class="form-control" name="idGrupo">
			<?php 
				foreach ($this->grupos as $grupo)
				{
				    //$selected = $this->grupo->getIdGrupo() == $grupo->getIdGrupo() ? "selected" : "";										
					echo "<option {$selected} value='{$grupo->getIdGrupo()}' > {$grupo->getNome()} </option>";
				}
			?>
		</select>
	</div>		
</div>

<div class="row">
	<div class="form-group col-sm-4">
		<label>Código</label>
		<input class="form-control" name="idSubGrupo" type="text" value="<?php echo $this->subgrupo->getIdSubGrupo(); ?>" readonly/>
	</div>			
</div>

<div class="row">
	<div class="form-group col-sm-4">
		<label>Descricao</label>
		<input class="form-control" name="descricao" type="text" value="<?php echo $this->subgrupo->getDescricao(); ?>"/>
	</div>
</div>

<div class="row">
	<div class="col-sm-4">	
		
		<a class="btn btn-danger" href="AcaoSubGrupo.php"> 
			<span class="glyphicon glyphicon-remove"></span> Cancelar 
		</a>

		<button type="submit" class="btn btn-success">
			<span class="glyphicon glyphicon-ok"></span> Salvar 
		</button>				
	</div>
</div>

</form>		

<?php			
	include_once("./View/Rodape.php");
?>